﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Admin
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="AdminContent" runat="server">

    <h2>Admin</h2>

    <table class="category" border="1">
        <tr>
            <th>
                ID
            </th>
            <th>
                UserName
            </th>
            <th>
                Password
            </th>
            <th>
                FirstName
            </th>
            <th>
                LastName
            </th>
            <th>
                Roll
            </th>
            <th>
                Action
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%: item.Id %>
            </td>
            <td>
                <%: item.UserName ?? "" %>
            </td>
            <td>
                <%: item.Password ?? "" %>
            </td>
            <td>
                <%: item.FirstName ?? "" %>
            </td>
            <td>
                <%: item.LastName ?? "" %>
            </td>            
            <td>
                <%: item.RollName ?? 0 %>
            </td>
            <td>
                <%: Html.ActionLink("Change Profile", "Edit", new { id=item.Id }) %>
                |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.Id })%>
            </td>
        </tr>
        <% } %>
    </table>
    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>
